package com.gg.ggw.model;

import javax.persistence.*;
import java.sql.Timestamp;

/**
 * Created by Administrator on 2016/12/8.
 */
@Entity
@Table(name = "gg_user_subscribe", schema = "guoguan", catalog = "")
public class GgUserSubscribe {
    private int id;
    private int uid;
    private int byuid;
    private Timestamp addtime;

    @Id
    @Column(name = "id")
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "uid")
    public int getUid() {
        return uid;
    }

    public void setUid(int uid) {
        this.uid = uid;
    }

    @Basic
    @Column(name = "byuid")
    public int getByuid() {
        return byuid;
    }

    public void setByuid(int byuid) {
        this.byuid = byuid;
    }

    @Basic
    @Column(name = "addtime")
    public Timestamp getAddtime() {
        return addtime;
    }

    public void setAddtime(Timestamp addtime) {
        this.addtime = addtime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        GgUserSubscribe that = (GgUserSubscribe) o;

        if (id != that.id) return false;
        if (uid != that.uid) return false;
        if (byuid != that.byuid) return false;
        if (addtime != null ? !addtime.equals(that.addtime) : that.addtime != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id;
        result = 31 * result + uid;
        result = 31 * result + byuid;
        result = 31 * result + (addtime != null ? addtime.hashCode() : 0);
        return result;
    }
}
